import Vue from 'vue'
import VueRouter from 'vue-router'
import configRouter from './routerConfig'

// install router
Vue.use(VueRouter)

// create router
var router = new VueRouter({
  history: true,
  saveScrollPosition: true
})

// configure router
configRouter(router)

// boostrap the app
const App = Vue.extend(require('./modules/index.vue'))
router.start(App, 'main')

// just for debugging
window.router = router

export default router
